<style type="text/css">
    td{font-size: 12px;}
    th, td{padding: 5px 24px; font-size: 14px;}
    tr{background-color: #fff;}
    tr:nth-child(odd){background-color: #f7f7f7;}
</style>
 <?php
    function dataPortugues($data)
    {
        $data = implode("-", array_reverse(explode("-", substr($data, 0, 10)))).substr($data, 10);
        return $data;
    }
    ?>

<div id="conteudo2">
    <? echo ($this->Session->flash()); ?>
    <table>
        <th>Data do Sistema</th>
        <th>Operador</th>
        <th>Instituição de Destino</th>
        <th>Prazo da Solução</th>
        <th>Providência Requerida</th>
        <th>Ação</th>
        <th>Resposta do Email</th>
        <th>Número da Ocorrência</th>
<?
//die(debug($users));
    foreach($Histories as $History)
    {
        echo('<tr>');
             echo('<td>');
                echo dataPortugues($History['History']['created']);
            echo('</td>');
       
            echo('<td>');
                echo($users[($History['History']['user_id'])]);
            echo('</td>');
      
            echo('<td>');
                if(isset($History['History']['institution_id']))
                        echo($institutions[($History['History']['institution_id'])]);
                    else {
                    echo '--';    
                    }
            echo('</td>');
            echo('<td>');
            echo dataPortugues($History['History']['date_solution']);
            echo('</td>');
            echo('<td>');
                echo($History['History']['providence']);
            echo('</td>');
            echo('<td>');
                echo($History['History']['action']);
            echo('</td>');
            echo('<td>');
                echo($History['History']['answer_email']);
            echo('</td>');
            echo('<td>');
                echo($History['History']['protocol']);
            echo('</td>');
        echo('</tr>');
        
    }
?>
    </table>
</div>